<template>
  <div>
    <!-- 面包屑 -->
    <Breadcrumb :style="{ marginLeft: '24px' }">
      <!-- <BreadcrumbItem :to="path(index)"  v-for="(item, index) in $route.meta.name"  :key="index">  {{ item }} </BreadcrumbItem> -->
      <BreadcrumbItem>主页</BreadcrumbItem>
      <BreadcrumbItem>主页1</BreadcrumbItem>
      <BreadcrumbItem>主页2</BreadcrumbItem>
    </Breadcrumb>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  watch: {
    $route(to, from) {
      this.breadcrumbItem_change();
      console.log('切换路由了')
    },
  },
  mounted() {
    this.breadcrumbItem_change();
  },
  methods: {
    /*面包屑路径处理*/
    breadcrumbItem_change() {
      let list = this.$route.fullPath.split("/"); //list[0]:是空格
      this.BreadcrumbItem = [];

    },
    
  },
};
</script>

<style lang="scss">
</style>